﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Konstaller
{
    public class StatusBar
    {
        //Private Field
        private string tx;


        /// <summary>
        /// Get or Set Status Text for StatusBar
        /// </summary>
        public string StatusText
        {
            get { return tx; }
            set { tx = value; }
        }


        /// <summary>
        /// Draw Method
        /// </summary>
        /// <param name="Width">Request a Width of Console</param>
        /// <param name="Height">Request a Height of Console</param>
        public void Draw(int Width, int Height)
        {
            Console.SetCursorPosition(0, Height - 1);
            Console.BackgroundColor = ConsoleColor.Gray;
            Console.ForegroundColor = ConsoleColor.White;

            Console.Write(" " + StatusText);

            int len = Width - StatusText.Length - 1;
            for (int i = 0; i < len;i++ )
            {

                Console.Write(" ");
            }

            Console.SetCursorPosition(0, 0);
        }

    }
}
